package com.example.demoweb.dao;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.example.demoweb.entity.Attachment;
/**
 * 对Attachment实体进行CRUD操作
 */
@Mapper
public interface AttachmentDao{

	//----------增加	
	/**
	 * @param Attachment
	 * 添加
	 */
	public void save(@Param("model")Attachment attachment);
	//-------根据主键删除
	/**
	 * @param Attachment
	 * 删除
	 */
	public void deleteById(@Param("id")String id);
	/**
	 * @param Attachment
	 * 逻辑删除
	 */
	public void deleteByModel(@Param("model")Attachment attachment);
	//---------------全字段修改
	/**
	 * @param Attachment
	 * 修改
	 */
	public void update(@Param("model")Attachment attachment);
	//---------------查找
	/**
	 * @param 
	 * @return 查找
	 */
	public Attachment getById(@Param("id")String id);
	/**
	 * 根据relaId查询
	 * @param uid
	 * @return
	 */
	public Attachment getAttByRelaId(@Param("relaId")String relaId);
	/**
	 * @param 
	 * @return 全部字段查找
	 */
	public Attachment getByModel(@Param("model")Attachment attachment);
	//-------------查找list
	/**
	 * @param model
	 */
	public List<Attachment> searchList(@Param("model")Attachment attachment);
	
	/**
	 * 根据relaId查询文件信息列表
	 * @param relaId
	 * @return
	 */
	public List<Attachment> searchAttListByRelaId(@Param("relaId")String relaId);
	
}
